package com.d0316;

import java.util.Scanner;

public class MyMath {
    public int div(String x, String y) throws ArithmeticException,NumberFormatException{
        int result=0;
        int a=Integer.parseInt(x);
        int b=Integer.parseInt(y);

        result=a/b;
        return result;

    }

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String x=scanner.next();
        String y=scanner.next();
        MyMath myMath=new MyMath();
    try{
    System.out.println(myMath.div(x,y));
    }catch (ArithmeticException e){
        System.out.println("除数位0");
    }catch (NumberFormatException e){
        System.out.println("格式不对");
    }catch (Exception e){
        System.out.println("有异常");
    }

    }
}
